package com.cwj.os.coursedesgin.bashor;

import java.io.File;
import java.nio.file.Path;

//  文件类

public class MyFile extends File{
    public  static String codeFile = ".proCode";
    TreeNode faDir;

    public MyFile(String pathname, TreeNode faDir) {
        super(pathname);
        this.faDir = faDir;
    }



    @Override
    public String toString() {
        TreeNode fa = this.faDir;
        return this.getName() + "\t|\t" + Path.of(this.faDir.getTree().getFaPath(),this.getName()).toString() +"\t|\t" +
                fa.getProCodeList().get(this.getName()) + "\t|\t" +this.length();
    }

    public TreeNode getFaDir() {
        return faDir;
    }

    public void setFaDir(TreeNode faDir) {
        this.faDir = faDir;
    }
}
